package com.yue.pattern.simplefactory;

/**
 * Created by qiuyang on 06/04/2017.
 */
public class SimpleFactory {
    public static Product createFactory(int condition) {
        Product product = null;

        if (condition == 0) {
            product = new ConcreteProduct();
        } else if (condition == 1) {
            product = new ConcreteProduct_1();
        } else {
            //... ...
        }

        return product;
    }
}
